package com.tanggh.action;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tanggh.domain.Person;

public class PersonActionTest {
	private BeanFactory beanFactory;
	@Before
	public void setUp() throws Exception {
		beanFactory = new ClassPathXmlApplicationContext("applicationContext-*.xml");
	}

	@Test
	public void testExecute() {
		Person person = new Person();
		person.setName("xxx");
		person.setSex("zzzz");
		
		PersonAction action = (PersonAction) beanFactory.getBean("personAction");
		action.setPerson(person);
		
		action.execute();
		System.out.println("ok");
		fail("Not yet implemented");
	}

}
